package com.example.eurekaconsumer;


import com.example.domain.User;
import com.example.eurekaconsumer.feign.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {
    @Autowired
    public FeignService feignService;

    @RequestMapping("/test")
    public String test(@RequestParam("test")String test) {
        return feignService.test(test);
    }

    @RequestMapping("/user")
    public User user(@RequestBody User user) {
        return feignService.user(user);
    }

}
